<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .box1 {
        width: 200px;
        height: 200px;
        background-color: red;
    }

    .box2 {
        width: 100px;
        height: 100px;
        background-color: blue;
    }

    .box3 {
        width: 50px;
        height: 50px;
        background-color: yellow;
    }
    ul{
        background-color: brown;
    }
</style>

<body>
    <div class="box1">
        <div class="box2">
            <div class="box3"></div>
        </div>
    </div>
    <ul>
        <li>123</li>
        <li>45</li>
        <li>54</li>
        <li>8</li>
        <li>456</li>
    </ul>
</body>
<script>
    const big = document.querySelector('.box1')
    const center = document.querySelector('.box2')
    const small = document.querySelector('.box3')
    const ul = document.querySelector('ul')
    const li = document.querySelector('li')
    big.onclick = function (e) {
        console.log(e.target);
        // console.log("我是big");
    }
    // center.onclick = function () {
    //     console.log("我是center");
    // }
    small.onclick = function (e) {
        e.stopPropagation()
    }
    ul.onclick = function (e) {
        console.log(e.target.innerHTML);
    }
</script>

</html>